﻿using AIO.Entity.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AIO.Entity
{
    /// <summary>
    /// 系部
    /// </summary>
    [Table("BA01")]
    [PrimaryKey("Id")]
    public class Department : BaseEntity
    {
        /// <summary>
        /// 系部名称
        /// </summary>
        [Column("BA001")]
        [Required]
        [MaxLength(50)]
        public string? Name { get; set; }

        /// <summary>
        /// 系部编码(不能超过100)
        /// </summary>
        [Column("BA002")]
        [Required]
        public int? Code { get; set; }
    }
}
